package com.julian.observerPattern2;

import java.util.Observable;

/**
 * the difference with observerPattern package : use Observable class of Jdk
 */
public class WeatherStation {

    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();
        CurrentConditionsDisplay currentConditionsDisplay =
                new CurrentConditionsDisplay((Observable) weatherData);
        weatherData.setMeasurements(80,65,30.4f);
        weatherData.setMeasurements(82,70,29.2f);
        weatherData.setMeasurements(78,90,29.2f);

        ForecastDisplay forecastDisplay = new ForecastDisplay((Observable) weatherData);
        weatherData.setMeasurements(100,100,100f);
    }
}
